home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 3.1 KB | 105 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLRefCnt.cpp
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFound.hpp"
-
- #ifndef FWDEBUG_H
- #include "FWDebug.h"
- #endif
-
- #ifndef FWODEXCE_H
- #include "FWODExce.h"
- #endif
-
-
- /*
- * This file was generated by the SOM Compiler.
- * Generated using:
- * SOM Emitter emitxtm.dll: 2.33
- */
-
- #ifdef FW_BUILD_MAC
- #pragma segment FWStream
- #endif
-
- #define FW_ORefCount_Class_Source
- #include "SLRefCnt.xih"
-
- #if defined(__MWERKS__) && GENERATING68K
- // A hack to work around a bug
- #pragma import list somPrintf
- #endif
-
- //----------------------------------------------------------------------------------------
- // FW_ORefCountAcquire
- //----------------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK FW_ORefCountAcquire(FW_ORefCount *somSelf, Environment *)
- {
- FW_ORefCountData *somThis = FW_ORefCountGetData(somSelf);
- FW_ORefCountMethodDebug("FW_ORefCount","FW_ORefCountAcquire");
-
- somThis->fRefCount++;
- }
-
-
- //----------------------------------------------------------------------------------------
- // FW_ORefCountRelease
- //----------------------------------------------------------------------------------------
-
- SOM_Scope long SOMLINK FW_ORefCountRelease(FW_ORefCount *somSelf, Environment *)
- {
- FW_ORefCountData *somThis = FW_ORefCountGetData(somSelf);
- FW_ORefCountMethodDebug("FW_ORefCount","FW_ORefCountRelease");
-
- FW_ASSERT(somThis->fRefCount != 0);
- return --somThis->fRefCount;
- }
-
-
- //----------------------------------------------------------------------------------------
- // FW_ORefCountGetRefCount
- //----------------------------------------------------------------------------------------
-
- SOM_Scope long SOMLINK FW_ORefCountGetRefCount(FW_ORefCount *somSelf, Environment *)
- {
- FW_ORefCountData *somThis = FW_ORefCountGetData(somSelf);
- FW_ORefCountMethodDebug("FW_ORefCount","FW_ORefCountGetRefCount");
-
- return somThis->fRefCount;
- }
-
-
- //----------------------------------------------------------------------------------------
- // FW_ORefCountsomInit
- //----------------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK FW_ORefCountsomInit(FW_ORefCount *somSelf)
- {
- FW_ORefCountData *somThis = FW_ORefCountGetData(somSelf);
- FW_ORefCountMethodDebug("FW_ORefCount","FW_ORefCountsomInit");
-
- FW_ORefCount_parent_SOMObject_somInit(somSelf);
- somThis->fRefCount = 0;
- }
-
-
- //----------------------------------------------------------------------------------------
- // FW_ORefCountsomUninit
- //----------------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK FW_ORefCountsomUninit(FW_ORefCount *somSelf)
- {
- FW_ORefCountData *somThis = FW_ORefCountGetData(somSelf);
- FW_ORefCountMethodDebug("FW_ORefCount","FW_ORefCountsomUninit");
-
- FW_ASSERT(somThis->fRefCount == 0);
- FW_ORefCount_parent_SOMObject_somUninit(somSelf);
- }
-